Repository navigation
Conversation
…kFlowLab#646) Four sites still treated a never-provided version as revision_conflict: reference.add on an empty node, canvas.materialize of a configured draft, applying an image edit, and publishing to an existing output node. They now raise version_required and list every missing object in one response, with bilingual templates. A supplied version that actually changed stays revision_conflict. Replacing a configured draft without discardGenerationDraft is invalid_input, not a version error. UI batch-save and cancel-retry still retry only revision_conflict. ContractIssue messages may be up to 2000 characters so a complete version_required list can fit.
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 1e9005c Fixes #646
Dot,代表 @david6666666。缺版本和版本陈旧现在能区分,前端只对 revision_conflict 重试的边界也保留了。但 timeline.publishRender 的新报错会把调用方引到错误的字段,按提示补完仍无法发布到已有节点。具体建议在对应行。
Ran: 核对四条命令的变更、作者的失败前回归和当前 Release 检查;未独立运行测试。Not run: 本轮交互浏览器验证;PR 没有贴双语实际修复截图。发布判断不受 main 单纯领先影响。
当前证据暂定 53/100,非批准分。范围 3/3、正确性 2/3、验证 2/3、主张证据 0/3(缺实际用户可见修复证据)、简洁度 2/3。先修恢复指引,再加一条按错误提示重试成功的回归,并贴双语界面结果。Base 6a68d74953bd20bff82395f1d3cadae5790d957b;head 1e9005cb9df1c5da27ffa06f4fcbcde6a24448dc。
| if payload.expectedOutputRevision is None: | ||
| raise ContractError('revision_conflict', '输出节点已存在,请提供其当前版本。', payload.outputId) | ||
| key = ('canvas_item', payload.outputId) | ||
| raise ContractError('version_required', version_required_message([key]), payload.outputId) |
There was a problem hiding this comment.
这里真正缺的是 payload.expectedOutputRevision。通用文案却让调用方往 expectedVersions 里补,CLI 也提示 --expected-version;只照这个提示重试还是会进同一分支。建议给 timeline 单独的双语恢复提示,明确 payload 字段和对应 CLI 入参,再加一个按提示重试就能成功的用例。
|
One recovery hint is still incomplete at Reproduced with local project storage and MP4 fixtures (no provider calls): Please mention |
…on-required # Conflicts: # packages/core/src/opendirector/domain/creation/contract_messages.py # packages/core/src/opendirector/domain/creation/validation.py
…very Publishing to an existing output node raised version_required with the generic expectedVersions hint. Following that hint still failed because the path checks payload.expectedOutputRevision. Use a dedicated bilingual hint that names expectedOutputRevision / --expected-output-revision and the matching expectedVersions entry, and retry successfully from the hint alone.
david6666666
left a comment
There was a problem hiding this comment.
WITHHOLD 60b1ef5 Fixes #646 · 非表决 COMMENT
上轮的恢复指引已修。原意见现在有对应回归:只补 expectedVersions 仍被拒;按新提示同时补 payload.expectedOutputRevision 和匹配条目才成功。英文、中文与 CLI 参数都覆盖。作者报告 208 项 focused tests 通过,我核对了实现和测试,没有独立运行。
复评 53/100(范围 3、正确性 3、验证 2、主张证据 0、简洁度 0;各满分 3)。当前 head 的 Release checks 还在跑;用户实际看到的双语错误界面仍缺截图,按量表不给 Claim evidence 分。新增解释性测试注释触发 Simplicity 硬零。下一步等同版 CI,并补一个按提示重试成功的实际场景。
English recap: The retry hint is fixed. Current CI and bilingual UI evidence are still outstanding.
Dot,代表 @david6666666 作非表决复审。
Summary
Four command paths still reported a missing version as
revision_conflict. They now useversion_requiredand list every missing object in one response. A version that was supplied but has actually changed still returnsrevision_conflict.reference.addon an empty node (draftSpec) whose canvas item is absent fromexpectedVersionscanvas.materializereplacing a configured draft when that spec's version was never providededitor_documentversion is missing fromexpectedVersions(typical in acreation.batch)timeline.publishRenderto an already existing output node withoutexpectedOutputRevisionReplacing a configured draft with the current spec version but without
discardGenerationDraftis nowinvalid_input, notversion_requiredorrevision_conflict. UI batch-save rebase and cancel-retry still retry only onrevision_conflict; aversion_requiredrejection is not treated as a stale conflict.version_requireduses bilingual en-US / zh-CN templates in the same shape as the still-open follow-up forgeneration.submit(#647), so the two PRs can merge later with minimal conflict. This PR does not take #647's other changes (origin-version requirement,use_canvas_move,help_field_invalid, 429 advice, or a globalrevision_conflictrewrite).ContractIssue.messagemax length is 2000 so a complete missing-object list can fit.Linked issue
Fixes #646. Related open work: #647 (Fixes #645) covers
generation.submitorigin versions; this PR does not close #645.Fixes #NorRefs #Nis included, or no issue appliesLabels
Proposed:
type:bug,area:canvas,area:i18n(the author cannot always set labels here).Test plan
1e9005cb(Python 3.13,PYTHONPATH=$PWD/packages/core/src:$PWD/apps/api/src:$PWD/tests,/tmp/od-venv):origin/main(6a68d749) and failed withrevision_conflictat all four sites as expected, then passed after the fix.python -m pytest tests/test_missing_version_required.py tests/test_creation_contracts.py::test_commands_prevent_role_bypass_and_require_explicit_draft_discard -q— 15 passedpython -m pytest tests/test_missing_version_required.py tests/test_creation_contracts.py tests/test_creation_canvas_service.py tests/test_creation_image_edits.py tests/test_creation_timeline_render.py tests/test_creation_api.py -q— 189 passedpython -m pytest tests -q— 3344 passed, 131 skipped, 1 failed:tests/test_creation_assets.py::test_missing_and_changed_files_never_return_empty_or_wrong_content(DID NOT RAISE ProjectError). The same test also fails on unmodifiedorigin/main6a68d749; it is not caused by this change.python scripts/generate_contracts.py --check— verifiednode --test tests/creationClient.test.ts— 44 passed, including new tests that batch-save and cancel-retry do not retryversion_required, while existingrevision_conflictrebase/cancel retries still passnpx tsc --noEmit— passednpm run check:i18n— 3522 keys, 0 problemsversion_requiredtemplates, stale vs missing vs discard, happy paths, and that UI retry still keys offrevision_conflictonly. Remaining interactive checks are listed under Evidence.Evidence that it works
No interactive UI screenshots. The user-visible change is the contract error code and bilingual message when a version was never provided. Automated receipts and localization assertions are in
tests/test_missing_version_required.py. Interactive confirmation of the four error surfaces (zh-CN / en-US), plus batch-save and cancel-retry, should still be done against an isolated fixture (see below).Provider verification
No provider calls were made. Timeline publish tests use local FFmpeg fixtures; image-edit tests use local PNG imports.
Bilingual UI
version_requiredand the configured-draft discard message have en-US and zh-CN templates, localized at the HTTP boundary. No other user-facing copy was added.Suggested remaining browser checks
Against isolated
tests/browser/creation_server.pyand Vite, in bothzh-CNanden-US:expectedVersions— expectversion_requiredlisting the node. Repeat with a stale node version — expectrevision_conflict.discardGenerationDraft: truebut no spec version —version_required. Same command with the current spec version and no discard flag —invalid_input. A stale spec version —revision_conflict.editor_documentfromexpectedVersions—version_required. A stale document version —revision_conflict. Confirm the canvas does not change.expectedOutputRevision—version_requirednamingexpectedOutputRevision/--expected-output-revision(and the matchingexpectedVersionsentry). Retry using only those hint fields and confirm it applies. Supplying only theexpectedVersionsentry must still fail.revision_conflict. A cancel that getsversion_requiredmust not auto-retry; a true cancelrevision_conflictfrom checkpoint progress should still retry.Review follow-up (60b1ef5)
Addresses the review that the
timeline.publishRenderrecovery hint named onlyexpectedVersions/--expected-version, so following it still could not publish to an existing output node.expectedOutputRevisionpath now uses a dedicated bilingualversion_requiredhint that namespayload.expectedOutputRevision/--expected-output-revisionand the matchingexpectedVersions/--expected-versionentry, including the current revision.test_publish_render_retry_follows_version_required_hint: the genericexpectedVersions-only retry still returnsversion_required; retrying with both fields parsed from the hint succeeds. Error code remainsversion_required.origin/main(42c5dc39) with an ordinary merge (no force-push). Conflicts were incontract_messages.pyandvalidation.py; both sides were kept.Local, on
60b1ef50(Python 3.13,PYTHONPATH=$PWD/packages/core/src:$PWD/apps/api/src:$PWD/tests,/tmp/od-venv):expectedVersions missing current versionswith aREVISIONplaceholder, noexpectedOutputRevision).pytest tests/test_missing_version_required.py tests/test_command_version_contract.py tests/test_creation_timeline_render.py tests/test_creation_contracts.py tests/test_canvas_text_cli.py tests/test_canvas_text_cli_http.py -q— 208 passed.